-- GENERATED SPELL FOR [Vilebranch Shadow Hunter] --


function spell0_2645(pUnit, Event) --@Shadow Shell,n/a--
pUnit:FullCastSpellOnTarget(9657,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2645', 10329, 1)
end

function spell1_2645(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(14032,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2645', 18000, 1)
end

function spell2_2645(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2645', 608, 1)
end

function Sorts_2645(pUnit, Event)
local choix_sorts_2645 = math.random(0, 2)
if choix_sorts_2645 == 0 then
pUnit:RegisterEvent('spell0_2645', 1, 1)
end
if choix_sorts_2645 == 1 then
pUnit:RegisterEvent('spell1_2645', 1, 1)
end
if choix_sorts_2645 == 2 then
pUnit:RegisterEvent('spell2_2645', 1, 1)
end
end

function mob2645_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2645', math.random(1500, 3000), 1)
end

function mob2645_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2645_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2645_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2645, 1, 'mob2645_Action')
RegisterUnitEvent(2645, 2, 'mob2645_Leave')
RegisterUnitEvent(2645, 3, 'mob2645_Kill')
RegisterUnitEvent(2645, 4, 'mob2645_Die')
